Validate the S5 MAC– Old Terminals

Command:

Validate the S5 MAC (MAC of the PSAM for a Batch) for old terminals.

Notes:

Use of this command requires the optional ESP licence. Error code 67 will be returned if the command is not licensed.

The MACing process for old terminals has a different pad process than standard. This is defined in Appendix G of specification 300HS50D

 

Field

Length & Type

Details

COMMAND MESSAGE

Message Header

m A

Will be returned to the Host unchanged

Command Code

2 A

Value “X4”

*KMACS5

32 H

Double length KMACS5 encrypted under LMK pair 20-21 variant 8

S5

16 H

Signature for verification

IDMCARD

4 B

MCard Identifier

Collection Number

1 B

Collection Number

NTMCARD

4 B

MCard Transaction Number

C.C.

1 B

Proprietary Completion Codes

Card Balance

4 B

New Card Balance

MTOTMCARD

4 B

Total Transaction Amount

CURRMCARD

2 B

Currency Code

CEXPMCARD

1 B

Currency Exponent

IDISS, MCARD

3 B

Issuer BIN or zeroes (For reloadable or disposable cards)

IDCARD, MCARD

5 B

Card Identifier

NTIEP

2 B

Card Transaction Number

RFU

1 B

Reserved

End Message Delimiter

1 C

Optional. Must be present if a message trailer is present. Value X'19

Message Trailer

n A

Optional. Maximum length 32 characters

 


 

Field

Length & Type

Details

RESPONSE MESSAGE

Message Header

m A

Will be returned to the Host unchanged

Response Code

2 A

Value “X5”

Error Code

2 N

00 – No error. S5 validated successfully

01 – S5 validation failed.

10 – KMAC parity error

12 – No keys loaded in user storage

13 – LMK error - report to Supervisor

15 – Error in input data

21 – Invalid user storage index

  

End Message Delimiter

1 C

Will only be present if present in the command message. Value X'19

Message Trailer

n A

Will only be present if in the command message. Maximum length 32 characters